<?php
$isadmin=1;
include "../../comm/tuaninc.php";
include('../check.php');

$field_arr=$_POST['info'];
$id=$field_arr['id'];
$arr=array('id');
$field_arr=$duoduo->arr_diff($field_arr,$arr);
$field_arr['startTime']=strtotime($field_arr['startTime']);
$field_arr['endTime']=strtotime($field_arr['endTime']);
if($id=='')
{
	$field_arr['addtime']=time();
	$field_arr['editime']=time();
    $duoduo->insert_one_sql('tuan_goods',$field_arr);
	admin_log('新增团购商品');
}
else
{
	$field_arr['editime']=time();
    $duoduo->update_sql('tuan_goods',$field_arr,"id=$id",0,0);
	admin_log('修改团购商品');
}

echo $duoduo->alert('保存成功','goodslist.php');
?>
